home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / tls / tls088.hpux.Z / tls088.hpux / lib / vtcl / tests / inputerr.tcl < prev    next >
Encoding:
Text File  |  1995-07-20  |  704 b   |  29 lines

  1. # CVS $Id: inputerr.tcl,v 1.3 1995/02/03 16:54:55 zibi Exp $
  2. #
  3. # This test that AddInput and RemoveInput will error out with bad input.
  4. #
  5. #
  6.  
  7. proc check {cmd errorStr} {
  8.          catch {
  9.              eval "$cmd"
  10.     } msg
  11.  
  12.          if {$msg == ""} {
  13.         error "FAILED !!:  $errorStr"
  14.     } else {
  15.         echo "PASSED: $errorStr"
  16.         echo "        $msg"
  17.     }
  18. }
  19.  
  20. pipe p1 p2
  21.  
  22. check "VtAddInput bad bad bad"  "VtAddInput, too many args"
  23. check "VtAddInput"  "VtAddInput, too little args"
  24. check "VtAddInput bad proc"  "VtAddInput, bad file descriptor"
  25.  
  26. check "VtRemoveInput bad bad bad"  "VtRemoveInput, too many args"
  27. check "VtRemoveInput "  "VtRemoveInput, too little args"
  28. check "VtRemoveInput bad"  "VtRemoveInput, bad file descriptor"
  29.